package com.syni.mdd.sjb.common.datatreaure.controller.protect;


import com.syni.mdd.sjb.common.datatreaure.controller.BaseController;
import com.syni.mdd.sjb.common.datatreaure.entity.vo.rq.industry.GetAllIndustryVo;
import com.syni.mdd.sjb.common.datatreaure.entity.vo.rq.services.NeedRqVo;
import com.syni.mdd.sjb.common.datatreaure.service.DxshAppIndustryService;
import com.syni.mdd.sjb.common.datatreaure.service.DxshAppManageTypeService;
import com.syni.mdd.sjb.common.datatreaure.service.DxshAppNeedService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author lcc
 * @since 2020-07-29
 */
@RestController
@RequestMapping("/dxshAppNeed")
public class DxshAppNeedController extends BaseController {

    @Autowired
    DxshAppNeedService dxshAppNeedService;

    @Autowired
    DxshAppIndustryService dxshAppIndustryService;

    @Autowired
    DxshAppManageTypeService dxshAppManageTypeService;

    @PostMapping("/saveBusinessNeed")
    @ApiOperation(value = "保存商户需求")
    public Map<String,Object> saveBusinessNeed(@RequestBody NeedRqVo needRqVo){
        return dxshAppNeedService.saveBusinessNeed(needRqVo);
    }

    @PostMapping("getAllIndustry")
    @ApiOperation(value = "获取所有行业")
    public Map<String,Object> getAllIndustry(@RequestBody GetAllIndustryVo getAllIndustryVo){
        return dxshAppIndustryService.getAllIndustry(getAllIndustryVo);
    }

    @PostMapping("getAllManageType")
    @ApiOperation(value = "获取所有经营类型")
    public Map<String,Object> getAllManageType(){
        return dxshAppManageTypeService.getAllManageType();
    }

}
